var arr = document.querySelectorAll(".myclick");

arr.forEach(function (emt, idx, array) {
    emt.onclick = function () {
        var jsonStr = this.getAttribute("data-param");// <div data-param="{url:'xxx',params:'a=2&b=5'}"></div>
        var arg = eval("(" + jsonStr + ")");
        location.href = arg.url + "?" + arg.params;

        return false;

    };
});